{* Smarty *}

<img src="img/welcome.png" style="padding:6;">
<br><br>
<div class="text_big"  style="position:relative; padding:0 0 0 6; margin:0 0 -3 0;">Credit Application</div>
<img src="img/line_big.gif" style="padding:0 0 0 6;" >


{literal}
<script>
function checkForm() {
	var f = document.forms["cr_app"];

	err = '';
	var e = f.elements['company'];
	if(e==null || e.value=='') {
		err += "\nType your company name";
	}
	e = f.elements['address'];
	if(e==null || e.value=='') {
		err += "\nType your address";
	}
	e = f.elements['city'];
	if(e==null || e.value=='') {
		err += "\nType your city";
	}
	e = f.elements['state'];
	if(e==null || e.value=='') {
		err += "\nType your state";
	}
	e = f.elements['zip'];
	if(e==null || e.value=='') {
		err += "\nType your zip";
	}
	e = f.elements['phone'];
	if(e==null || e.value=='') {
		err += "\nType your phone";
	}
/*	e = f.elements['fax'];
	if(e==null || e.value=='') {
		err += "\nType your fax";
	}*/
	e = f.elements['email'];
	if(e==null || e.value=='' || !validateEmail(e.value)) {
		err += "\nType correct email address";
	}
	e = f.elements['cperson'];
	if(e==null || e.value=='') {
		err += "\nType contact person name";
	}
	e = f.elements['bank'];
	if(e==null || e.value=='') {
		err += "\nType your bank name";
	}
	
	if(err!='') {
		alert("There was errors:\n"+err);
		return false;
	}
	return true;
}
</script>
{/literal}

<table cellpadding="1" cellspacing="1" border="0" id="content_text" align="center">
		<form name="cr_app" action="?path=staticpage&page=credit" method="post" onSubmit="return checkForm()">
		<input type="hidden" name="event" value="CR_App">
		<tr><td align="right">Company/Store Name:<sup>*</sup></td><td><input type="text" name="company" class="inputtext" style="width:180px"></td></tr>
		<tr><td align="right">Address<sup>*</sup></td><td><input type="text" name="address" class="inputtext" style="width:180px"></td></tr>
		<tr><td align="right">City:<sup>*</sup></td><td><input type="text" name="city" class="inputtext" style="width:180px"></td></tr>
		<tr><td align="right">State:<sup>*</sup></td><td><input type="text" name="state" class="inputtext" style="width:180px"></td></tr>
		<tr><td align="right">Zip:<sup>*</sup></td><td><input type="text" name="zip" class="inputtext" style="width:180px"></td></tr>

		<tr><td align="right">Telephone:<sup>*</sup></td><td><input type="text" name="phone" class="inputtext" style="width:180px"></td></tr>
		<tr><td align="right">FAX:</td><td><input type="text" name="fax" class="inputtext" style="width:180px"></td></tr>
		<tr><td align="right">E-mail:<sup>*</sup></td><td><input type="text" name="email" class="inputtext" style="width:180px"></td></tr>
		<tr><td align="right">Contact Person:<sup>*</sup></td><td><input type="text" name="cperson" class="inputtext" style="width:180px"></td></tr>
		<tr><td align="right">Bank:<sup>*</sup></td><td><input type="text" name="bank" class="inputtext" style="width:180px"></td></tr>
		<tr><td align="right">Years in business:</td><td><input type="text" name="yrbiz" class="inputtext" style="width:180px"></td></tr>
		<tr><td valign="top" align="right">Please Supply 3<br />References:</td><td><textarea name="refs" cols="35" rows="7" class="inputtext" style="width:180px; height:60px;"></textarea> </td></tr>
		<tr><td valign="top" align="right">Message:</td><td><textarea name="msg" cols="35" rows="7" class="inputtext" style="width:180px; height:60px;"></textarea> </td></tr>
		<tr><td height="30" colspan="2" align="center"><input type="submit" value="Submit Form" class="inputsubmit">&nbsp;&nbsp;&nbsp;<input type="reset" value="Reset Form" class="inputsubmit"></td></tr>				
		</form>
	</table>


